package cn.appsys.controller;

import cn.appsys.service.DictionaryService;
import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/dictionary")
public class DictionaryController {

    @Resource
    DictionaryService dictionaryService;

    @GetMapping("/getListByTypeCode")
    @ResponseBody
    public Object getListByTypeCode(@RequestParam("tcode") String typeCode){
        return JSON.toJSONString(dictionaryService.getListByTypeCode(typeCode));
    }





}
